package j10;

public class Ex72_OOP {

	public static void main(String[] args) {
		//객체 생성 및 객체 다루기
		Ex_retangle sq = new Ex_retangle();
		sq.width = 3.5;
		sq.height = 35.9;
		sq.color = "orange";
//		sq.getArea() = 4.0;
//		sq.getCircum() = 5.0;
//		
		System.out.println(sq.width);
		System.out.println(sq.height);
		System.out.println(sq.color);
		
		sq= new Ex_retangle(4, 40, "red");
		System.out.println();
		
//		Ex_Fan fan = new Ex_Fan();
//		fan.radius = 5;
//		fan.color = "blue";
//		fan.on = "정지";
//		fan.speed = 3;
//		System.out.println(fan.radius);
//		System.out.println(fan.color);
//		System.out.println(fan.on);
		
//		Ex_Account ac = new Ex_Account();
//		ac.aid = 1122;
//		ac.balance = 20000;
//		ac.interestRate = 4.5;
//		ac.dateCreated = "2014-08-15 14:34:29";
//		System.out.println(ac.aid);
//		System.out.println(ac.balance);
//		System.out.println(ac.interestRate);
//		System.out.println(ac.dateCreated);
		
//		Ex_Stock st = new Ex_Stock();
//		st.sname = "종목명 \"경영기술\"";
//		st.previousClosingPrice = "종가 100만원";
//		st.currentPrice = "현재가 75만원";
//		System.out.println(st.sname);
//		System.out.println(st.previousClosingPrice);
//		System.out.println(st.currentPrice
//				
//				);
		
	} //main

} //class 

		class Ex_retangle {
			double width;
			double height;
			String color;
			double area;
			double circum;
		
				
		public Ex_retangle() {
			}
		public Ex_retangle(double width, double height, String color){
			this.width = width;
			this.height = height;
			this.color = color;
		}
		double getArea() {
			double area = width*height; return area;}
		double getCircum(){
			double circum = (width*2)+(height*2); return circum;
		}
		} //Ex_retangle
		
//		class Ex_Fan {
//			final int SLOW;
//			final int MEDIUM;
//			final int FAST;
//			int speed;
//			String on;
//			double radius;
//			String color;
//		public Ex_Fan() {
//			SLOW = 1;
//			MEDIUM = 2;
//			FAST = 3;
//			speed = SLOW;
//			on = "false";
//			radius = 5.0;
//			color = "blue";
//			}
//		}
//		
//		class Ex_Account {
//			int aid;
//			int balance;
//			double interestRate;
//			String dateCreated;
//		public Ex_Account() {
//			aid = 0;
//			balance = 0;
//			interestRate = 0;
//			}
//		}
//		
//		class Ex_Stock {
//			String sname;
//			String previousClosingPrice;
//			String currentPrice;
//		public Ex_Stock() { 
//			}	
//		}
		